<?php
   header('Content-type:text/html;charset=utf-8');
   $url="http://news.xinhuanet.com/tech/2014-02/18/c_119393681.html";
   $curl=curl_init($url);//初始化curl
   $fp=fopen("aa.txt",'w');//以只写方式打开aa.txt
   //curl_setopt为给定的curl会话句柄设置一个选项
   curl_setopt($curl,CURLOPT_URL,$url);
   curl_setopt($curl,CURLOPT_FILE,$fp);
   curl_setopt($curl,CURLOPT_HEADER,1);
   curl_exec($curl);
   curl_close($curl);
   fclose($fp);
  ?>